/**
 * Copyright:Copyright(c)2014-2017
 * Company:厦门市易致达物联网科技有限公司
 * @version 1.0
 */
package shop.services.manage.weightrecord.dao.impl;

import java.util.List;

import shop.core.common.dao.BaseDao;
import shop.core.common.dao.page.PagerModel;
import shop.services.manage.weightrecord.bean.Weightrecord;
import shop.services.manage.weightrecord.dao.WeightrecordDao;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

/**
 * @类名称：WeightrecordDaoImpl
 * @创建人：wzl
 * @创建时间：2018-04-23 下午19:46:19  
 * @版本号：1.0
 * @描述：
 */
@Repository("weightrecordDaoManage")
public class WeightrecordDaoImpl  implements WeightrecordDao {

    @Resource
    private BaseDao dao;

    public void setDao(BaseDao dao) {
        this.dao = dao;
    }

    public PagerModel selectPageList(Weightrecord e) {
        return dao.selectPageList("manage.weightrecord.selectPageList","manage.weightrecord.selectPageCount", e);
    }

    public List selectList(Weightrecord e) {
        return dao.selectList("manage.weightrecord.selectList", e);
    }

    public Weightrecord selectOne(Weightrecord e) {
        return (Weightrecord) dao.selectOne("manage.weightrecord.selectOne", e);
    }

    public int delete(Weightrecord e) {
        return dao.delete("manage.weightrecord.delete", e);
    }

    public int update(Weightrecord e) {
        return dao.update("manage.weightrecord.update", e);
    }

    public int deletes(String[] ids) {
        Weightrecord e = new Weightrecord();
        for (int i = 0; i < ids.length; i++) {
            e.setId(ids[i]);
            delete(e);
        }
        return 0;
    }

    public int insert(Weightrecord e) {
        return dao.insert("manage.weightrecord.insert", e);
    }

    public int deleteById(int id) {
        return dao.delete("manage.weightrecord.deleteById", id);
    }

    @Override
    public Weightrecord selectById(String id) {
        return (Weightrecord) dao.selectOne("manage.weightrecord.selectById", id);
    }

    @Override
    public PagerModel selectSandpitPage(Weightrecord weightrecord) {
        return dao.selectPageList("manage.weightrecord.selectSandpitPage","manage.weightrecord.selectSandpitPageCount", weightrecord);
    }

    @Override
    public PagerModel selectSandpitDetailPage(Weightrecord weightrecord) {
        return dao.selectPageList("manage.weightrecord.selectSandpitDetailPage","manage.weightrecord.selectSandpitDetailPageCount", weightrecord);
    }

    @Override
    public PagerModel selectCartPage(Weightrecord weightrecord) {
        return dao.selectPageList("manage.weightrecord.selectCartPage","manage.weightrecord.selectCartPageCount", weightrecord);
    }

    @Override
    public PagerModel selectCartDetailPage(Weightrecord weightrecord) {
        return dao.selectPageList("manage.weightrecord.selectSandpitDetailPage","manage.weightrecord.selectSandpitDetailPageCount", weightrecord);
    }

    @Override
    public PagerModel selectProductPage(Weightrecord weightrecord) {
        return dao.selectPageList("manage.weightrecord.selectProductPage","manage.weightrecord.selectProductPageCount", weightrecord);
    }

    @Override
    public PagerModel selectProductDetailPage(Weightrecord weightrecord) {
        return dao.selectPageList("manage.weightrecord.selectSandpitDetailPage","manage.weightrecord.selectSandpitDetailPageCount", weightrecord);
    }
}

